﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace TrackSystem.EntityFramework.Migrations
{
    /// <inheritdoc />
    public partial class cm7 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "27560935-0ff2-4063-b56f-b577c4d5a160");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "40b5282a-643a-4081-850b-63ba4f106821");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "952c709e-2db1-407a-a3f2-0c2a3e0f0b44");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "9d05d9fa-f13d-4fa8-bba6-f428e4658fe9");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "e23a3a86-f25f-4369-8871-a98d51d4bad3");

            migrationBuilder.RenameColumn(
                name: "LDeadZone",
                table: "Loop",
                newName: "PDeadZone");

            migrationBuilder.RenameColumn(
                name: "HDeadZone",
                table: "Loop",
                newName: "NDeadZone");

            migrationBuilder.AlterColumn<string>(
                name: "Description",
                table: "Loop",
                type: "varchar(200)",
                maxLength: 200,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200)
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "Description",
                table: "Equip",
                type: "varchar(200)",
                maxLength: 200,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200)
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "7986346b-3136-4f89-bac7-2cb56ad8a6b4", null, "Admin", "ADMIN" },
                    { "9517e0d3-ffdb-44c0-bb71-71456af007ae", null, "Guest", "Guest" },
                    { "a9b42537-2536-4c7b-b537-4a839c196620", null, "Op", "Operator" },
                    { "c6d874ed-7b80-4068-b2fc-776cd9e9533b", null, "User", "User" },
                    { "d4f71599-da8b-4c65-bbe3-c1a5e9b6e25b", null, "Eng", "Engineer" }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "7986346b-3136-4f89-bac7-2cb56ad8a6b4");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "9517e0d3-ffdb-44c0-bb71-71456af007ae");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "a9b42537-2536-4c7b-b537-4a839c196620");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "c6d874ed-7b80-4068-b2fc-776cd9e9533b");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "d4f71599-da8b-4c65-bbe3-c1a5e9b6e25b");

            migrationBuilder.RenameColumn(
                name: "PDeadZone",
                table: "Loop",
                newName: "LDeadZone");

            migrationBuilder.RenameColumn(
                name: "NDeadZone",
                table: "Loop",
                newName: "HDeadZone");

            migrationBuilder.UpdateData(
                table: "Loop",
                keyColumn: "Description",
                keyValue: null,
                column: "Description",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "Description",
                table: "Loop",
                type: "varchar(200)",
                maxLength: 200,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldNullable: true)
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "Equip",
                keyColumn: "Description",
                keyValue: null,
                column: "Description",
                value: "");

            migrationBuilder.AlterColumn<string>(
                name: "Description",
                table: "Equip",
                type: "varchar(200)",
                maxLength: 200,
                nullable: false,
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldMaxLength: 200,
                oldNullable: true)
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "27560935-0ff2-4063-b56f-b577c4d5a160", null, "Admin", "ADMIN" },
                    { "40b5282a-643a-4081-850b-63ba4f106821", null, "Guest", "Guest" },
                    { "952c709e-2db1-407a-a3f2-0c2a3e0f0b44", null, "User", "User" },
                    { "9d05d9fa-f13d-4fa8-bba6-f428e4658fe9", null, "Eng", "Engineer" },
                    { "e23a3a86-f25f-4369-8871-a98d51d4bad3", null, "Op", "Operator" }
                });
        }
    }
}
